import {  VPage } from "tonwa";
import { List, LMR } from "tonwa-react";
import { LogisticCenter } from "uq-app/uqs/BzTicket";
import { CLogsticCenter } from ".";

export class VLogsticCenter extends VPage<CLogsticCenter> {
    header() { return '产品管理'; }
    right() {
        return <div>11111M</div>
        // <button className="btn btn-sm btn-success me-2" onClick={this.controller.newProduct}>
        //     <FA name="plus" />
        // </button>;
    }
    content() {

        return <div>aaaaa-测试页面
            <List items={this.controller.LogsticCenterList}
            item={{ render: this.renderItem}} />
                {/* // item={{ render: this.renderItem, onClick: (item: Product) => this.controller.editProduct(item) }} /> */}
        </div>;

    }

    private renderItem = (item: LogisticCenter, index: number) => {
        let { no, 物流中心编号, 物流中心名称 } = item
        return <div className="px-3 py-2 d-block">
            <LMR left={<b>{物流中心编号}</b>} right={<small className="text-muted">{no}</small>}></LMR>
            <div className="small text-muted">{物流中心名称}</div>
        </div>
    };
}